// import { ref } from "vue"

let v = ref<string>('')
let flag = ref<boolean>(false)

let arr = [1, 2, 3, 4]

type Props = {
  title: string
}

const renderDom = (props: Props, ctx: any) => {
  return (
    <div>
      <input v-model={ v.value } type="text" />
      <div>hello tsx { v.value }</div>
      <div v-show={flag.value}>xxxxx</div>
      <div>{props.title}</div>
      { flag ? <div>解决</div> : <div>mei</div> }

      {
        arr.map(item => {
          return (<div onClick={clicktap.bind(this, item, ctx)} data-index={item}>{ item }</div>)
        })
      }
      
    </div>
  )
}

const clicktap = (v:number, ctx:any) => {
  ctx.emit('on-click', 123)
  console.log(v)
}

export default renderDom

